package com.sss.day35_mvc_mybatis.controller;

import com.sss.day35_mvc_mybatis.util.R;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 全世界我最爱朴彩英！
 *
 * @Author sss
 * @Create 2023/11/30 19:55
 * @desc
 */
@RestController
public class Demo8TestLogController {

    // 导入包import org.apache.logging.log4j.LogManager;
    // 导入包import org.apache.logging.log4j.Logger;
    private final Logger logger = LogManager.getLogger(Demo8TestLogController.class);

    @GetMapping("/log")
    public R log() {
        logger.debug("这是debug级别");
        logger.info("我是消息");
        logger.warn("我是警告");
        logger.error("我是错误！");
        return R.ok( );
    }
}
